<?php


namespace Part17_AdapterMode\Code2;

/**
 * 翻译者适配器
 */
class Translator extends Player
{

    private $wjzf;

    public function __construct($name)
    {
        $this->wjzf = new ForeignCenter();
        $this->wjzf->setName($name);
    }

    public function Attack()
    {
        $this->wjzf->进攻();
    }


    public function Defence()
    {
        $this->wjzf->防守();
    }
}